package wicket;

import org.apache.wicket.behavior.HeaderContributor;
import org.apache.wicket.markup.html.WebPage;

public class WicketHomePage extends WebPage {

	private static boolean isSessionActive;
	
	public WicketHomePage(){
		add(HeaderContributor.forCss(WicketHomePage.class, "style.css"));
		if (isSessionActive)
			add(new ListPanel("contentPanel"));
		else
			add(new ConnexionPanel("contentPanel"));
		
		//add(new ConnexionPanel("connexionPanel"));
		//add(new ListPanel("listPanel"));
		
	}

	public static void setSessionActive(boolean newIsSessionActive) {
		isSessionActive = newIsSessionActive;
	}

	public static boolean isSessionActive() {
		return isSessionActive;
	}
}
